<html>
<title>忘记密码</title>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/wangji.css"> 
</head>
<body>
<div class="top_info"><span class="top_left" onclick="history.go(-1)"><</span>  <span class="top_right">获取手机验证码</span> </div>
<hr class="wangji_password_hr"/>

<div class="pa_wri_tel"> <input placeholder="请输入电话号码" type="text"  class="tel_num_pa" /></div>

<hr class="wangji_password_hr"/>

<div class="pa_wri_yan"> <div onclick="yzm()" class="set_yzm">免费获取验证码</div> <input placeholder="请输入验证码" type="text" class="yzm_info" /></div>

<hr class="wangji_password_hr"/>
<div class="submit_info" onclick="wang_next_vrify()">提交</div>



<script type="text/javascript">
      function yzm(){
        var phone=$('.tel_num_pa').val();
        $.post("{:U('Index/yzm')}",{phone:phone,wang:1},function(dates){
                   if(dates=='00000'){
                       settime();
                       $('.quyzmclick').unbind();
                        alert('证码发送成功,请注意查收');
                        return false;
                   }else if(dates=='00104'){
                        alert('今天提交次数太多了,明天再来吧');
                        return false;
                   }else if(dates=='00007'){
                       alert('请您不要重复提交,别闹 短信都是钱来的');
                        return false;
                   }else if(dates=='00008'){
                       alert('操作频繁,手速快容易伤肾');
                        return false;
                   }else if(dates=='00012'){
                       alert('不支持get请求，请使用post');
                        return false;
                   }
        })
      }

            var countdown=60; 
                function settime() { 
                         if (countdown == 0) { 
                            // $('.hqyzm').removeAttribute("disabled");    
                            $('.set_yzm').text("免费获取验证码"); 
                            $('.set_yzm').attr('onclick','yzm()');
                            countdown = 60; 
                            $('.quyzmclick').bind();
                            return;
                        } else { 
                            // obj.setAttribute("disabled", true); 
                            $('.set_yzm').text("重新发送(" + countdown + ")");
                            $(".set_yzm").removeAttr("onclick");
                            countdown--; 
                        } 
                    setTimeout(function() { 
                        settime() }
                        ,1000) 
                                   }
    </script>
    <script type="text/javascript">
        function wang_next_vrify(){
                 var phone=$('.tel_num_pa').val();
                 var yzm=$('.yzm_info').val();  
                $.post("{:U('Index/ver_yzm')}",{phone:phone,yzm:yzm},function(data){
                    if(data.status==100){
                         location.href="{:U('Index/yzm_info')}";
                         return false;
                    }else if(data.status==101){
                      alert(data.info);
                      return false;
                    }
                 })
    }
    </script>
</body>
</html>                                                                                                                                                                                                 

